<?php // index.php - Installation Guide and Wizard
define('DB_DNC', true); // do not connect to PDO DB
require_once('../inc/inc.common.php');

$tmpl 		= new mvTemplate();
$tmpl->compile_dir = null;

/*********************
* Already Installed
*********************/
if(mvSettings::get('kbinstall') == 1){
	$tmpl->page_install('install_completed.tpl');

/*********************
* First Page
*********************/
}else{
	$req_check = true;

	// Required items for a successful install
	if(is_writable(POMBY_DIR . '/cache/smarty/cache')){
		$tmpl->assign('perm_pass3', true);
	}else{
		$req_check = false;
	}

	if(is_writable(POMBY_DIR . '/cache/smarty/compile')){
		$tmpl->assign('perm_pass4', true);
	}else{
		$req_check = false;
	}

	if(is_writable(POMBY_DIR . '/attach')){
		$tmpl->assign('perm_pass1', true);
	}else{
		$req_check = false;
	}

	if(is_writable(POMBY_DIR . '/config')){
		$tmpl->assign('perm_pass2', true);
	}else{
		$req_check = false;
	}

	if(class_exists('PDO')){
		$tmpl->assign('pdo_pass', true);
	}else{
		$req_check = false;
	}

	// reccomended settings
	if(function_exists('apc_add'))
		$tmpl->assign('apc_pass', true);

	if(!function_exists('get_magic_quotes_gpc') || !get_magic_quotes_gpc())
		$tmpl->assign('magic_pass', true);

	// informational
	$tmpl->assign('server_os', PHP_OS);

	$tmpl->assign('pass', $req_check);
	$tmpl->page_install('install_start.tpl');
}

?>